<layout name="../../../resource/master"/>

<section class="scrollable padder">
    <ul class="breadcrumb no-border no-radius b-b b-light pull-in">
            <li><a href=""></i> 首页</a></li>
            <li class="active">品牌管理</li>
    </ul>

    <section class="panel panel-default">
        <header class="panel-heading">
            品牌列表
        </header>

        <div class="row wrapper">
            <div class="col-sm-4 m-b-xs">
                <a href="{:u('admin/brand/add')}" class="btn btn-default btn-sm">添加品牌</a>
            </div>
        </div>

        <div class="table-responsive">
            <table class="table table-striped b-t b-light">
                <thead>
                <tr>
                    <td>品牌id</td>
                    <td>品牌名称</td>
                    <td>品牌Logo</td>
                    <td>排序</td>
                    <td>是否显示</td>
                    <td>操作</td>
                </tr>
                </thead>

                <tbody>
                <volist name="brand" id="vo">
                <tr>
                    <td>{$vo['bid']}</td>
                    <td>{$vo['bname']}</td>
                    <td>
                        <img src="__ROOT__/{$vo['logo']}" width="50px">
                    </td>
                    <td>{$vo['sort']}</td>
                    <td><if condition="$vo['ishot']==1">显示
                        <else/>
                        不显示</if>
                    </td>

                    <td>
                        <div class="btn-group">
                            <button data-toggle="dropdown" class="btn btn-primary btn-xs dropdown-toggle" aria-expanded="false">操作 <span class="caret"></span></button>
                            <ul class="dropdown-menu dropdown-menu-right">
                                    <li><a href="{:u('admin/brand/edit',['bid'=>$vo['bid']])}">编辑</a></li>
                                    <li class="divider"></li>
                                    <li><a href="{:u('del',['bid'=>$vo['bid']])}">删除</a></li>
                            </ul>
                        </div>
                    </td>
                </tr>
                    </volist>
                </tbody>
            </table>
        </div>

        <div class="pagination pagination-sm pull-right">
               {$page}
        </div>
    </section>
</section>